<template>
  <div>
    <el-container>
      <el-header style="padding: 0">
        <div
          style="
            height: 100%;
            line-height: 60px;
            text-align: center;
            font-size: 25px;
            background-color: #444;
            color: #fff;
          "
        >
          房源后台管理
        </div>
      </el-header>
      <el-container class="custom-container">
        <el-aside class="aside" width="200px">
          <el-menu
            router
            style="height: 100%; background-color: #585952"
            :default-active="$route.path"
            text-color="#aaa"
            active-text-color="#e6e6e6"
          >
            <el-menu-item index="/component/usermanage">
              <i class="el-icon-user-solid"></i>
              用户管理
            </el-menu-item>

            <el-menu-item index="/component/housemanage">
              <i class="el-icon-notebook-2"></i>
              <span slot="title">房源管理</span>
            </el-menu-item>

            <el-menu-item index="/component/addusermanage">
              <i class="el-icon-notebook-2"></i>
              <span slot="title">添加房源</span>
            </el-menu-item>

            <el-menu-item index="/component/ordermanage">
              <i class="el-icon-time"></i>
              预约管理
            </el-menu-item>

            <el-menu-item index="/component/contactrecord">
              <i class="el-icon-phone"></i>
              联系记录
            </el-menu-item>

            <el-menu-item index="/component/parkmanage">
              <i class="el-icon-s-home"></i>
              园区管理
            </el-menu-item>

            <el-menu-item index="/component/backusermanage">
              <i class="el-icon-s-grid"></i>
              后台用户管理
            </el-menu-item>

             <el-menu-item index="/component/map">
              <i class="el-icon-s-grid"></i>
              地图管理
            </el-menu-item>

            
             <el-menu-item index="/component/upload">
              <i class="el-icon-s-grid"></i>
              上传图片
            </el-menu-item>
          </el-menu>
        </el-aside>

        <el-main style="height: 100%; padding: 10px; background: #f0f0f4">
          <!-- 二级路由占位符 -->
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  watch: {
    $route: function (value) {
      console.log(value);
    },
  },
};
</script>

<style lang="scss" scoped>
.aside::-webkit-scrollbar {
  display: none;
}
.el-card__body,
.el-main {
  padding: 0;
}
.custom-container {
  height: calc(100vh - 60px);
}
.el-menu-item:focus,
.el-menu-item:hover {
  background-color: #738593;
}
.el-menu-item.is-active {
  background-color: #738593;
}
.el-form-item__label {
  min-width: 70px;
}
</style>
